
//获取到遮罩框
 var zhezhao =  document.getElementById("zhezhao");
 //获取到登录 注册框 
 var regist=document.getElementById("regist");
 var login=document.getElementById("login");
 var zckuang = document.getElementById("zckuang");
 var dlkuang = document.getElementById("dlkuang");


/*遮罩事件*/
 function overlay(e){
      zhezhao.style.visibility = (zhezhao.style.visibility == "visible")||((zhezhao.style.visibility == ""))? "hidden" : "visible";
	   if( zhezhao.style.visibility !="visible"){
	   	   dlkuang.setAttribute("style","transform:rotateY(0deg);")
    	   zckuang.setAttribute("style","transform:rotateY(-180deg);")
	   }

}

/*注册 登陆 按钮事件*/
login.onclick = function(e){
	
 	 var  targetBtn  = e.target;
 	 //  遮罩层显示出来  默认  login模块在前边
 	 overlay();
 } 

regist.onclick = function(e){
	dlkuang.setAttribute("style","transform:rotateY(180deg);")
   zckuang.setAttribute("style","transform:rotateY(0deg);")
    overlay();
}

/*切换事件*/
/*登录页到注册*/
var qh_zc=document.getElementById("qh_zc");
/*注册登录页到*/
var qh_dl=document.getElementById("qh_dl");

qh_dl.onclick = function(){
	dlkuang.setAttribute("style","transform:rotateY(0deg);")
    zckuang.setAttribute("style","transform:rotateY(180deg);")
	}

qh_zc.onclick = function(){
	dlkuang.setAttribute("style","transform:rotateY(-180deg);")
    zckuang.setAttribute("style","transform:rotateY(0deg);")
	}



